package com.javaoopfour;

public class User {
   private  int id;
   private String name;
   private int age;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age<=0){
            this.age = 1;
        }else {
            this.age = age;
        }

    }
}
